<div style="padding:0 0.5rem">
<div class='fui-cell-group'>
	<div class="fui-cell-title bold" style="">商品统计 <span style="color:#999;">(共{{pagedata.alltotal ||0}}件)</span></div>
	<div class="weui_cells weui_cells_checkbox" style="margin-top:0">
	<label class="weui_cell weui_check_label" ng-repeat="item in pagedata.allgoods" for="s{{$index}}">
		<div class="weui_cell_hd" style="width: auto;padding-right: 0">
			<input type="checkbox" ng-click="duoxuans(item.key,pagedata.params,'select');tool.get_list('jy_quan/feelog/jielilist/',true)" name="checkbox1" class="weui_check" id="s{{$index}}" ng-checked="pagedata.params.select.indexOf(';'+item.key+';')>=0"/>
			<i class="weui_icon_checked"></i>
		</div>
		<div class="weui_cell_bd weui_cell_primary">
			<span>{{item.title}}</span>
			<span ng-if="item.optiontitle">({{item.optiontitle}})</span>
		</div>
		<div class='weui_cell_ft'>
			<span class='fui-label fui-label-default gray' style="background:#f2f2f2;border-radius:0.2rem;">+{{item.total}}</span>
		</div>
	</label>
	</div>
</div>
		<div ng-repeat="item in pagedata.list" class='fui-cell-group' ng-show="pagedata.list.length>0" >
			<div class="fui-cell">
				<div class="fui-cellone-label" style="padding-right: 0.3rem">
					<img style="width: 2rem;height: 2rem" ng-src="{{tomedia(item.user.avatar) || '../core/resource/images/gw-user.png'}}"/>
				</div>
				<div class="fui-cell-text">
					<div>{{item.user.nickname}}</div>
					<div><span class="subtitle" style="font-size:0.5rem;padding-top:0.1rem">{{item.createtime}} 接龙</span></div>
				</div>
				<div class='fui-cell-remark noremark'>
					<a href="tel:{{item.address.mobile}}" class='fui-label fui-label-default gray' style="background:#f2f2f2;border-radius:0.2rem;">联系TA</a>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-text" style="line-height:1.8">
					活动：{{item.info.title || '帖子名称'}}
				</div>
				<div class='fui-cell-remark noremark'>
					<div ng-if="item.status<=1 && item.orderid!=0" class="subtitle" style="font-size:0.56rem;color:#999">{{item.status==1?'已支付':'待支付'}}</div>
					<div ng-if="item.status==2" class="subtitle" style="font-size:0.56rem;color:#999">已完成</div>
				</div>
			</div>
			<div class="fui-cellone" ng-repeat="g in item.goods" style="padding:0.3rem 0.5rem">
				<div class="fui-cellone-info">
					{{g.title}}
				</div>
				<span ng-if="g.optiontitle" class="fui-cellone-info" style="color:red">
					({{g.optiontitle}})
				</span>
				<div class="fui-cellone-remark noremark">
					{{g.total}}{{g.unit}}
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-text" style="line-height:1.8">
					实际支付：<span class="red">￥{{item.fee || '0.00'}}</span>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-text" style="line-height:1.8">
					<div style="line-height:1.4;color:#999;font-size:0.65rem"><i class="icon icon-wo1"></i> 联系人： <span class="text-danger" style="padding-right:0.5rem">{{item.address.name}}  </span> 联系电话： <a href="tel:{{item.address.mobile}}" class="text-danger">{{item.address.mobile}}</a></div>
					<div style="line-height:1.4;color:#999;font-size:0.65rem"><i class="icon icon-ditu"></i>  配送地址： <span class="text-danger">{{item.order_out.pcd.province}} {{item.address.pcd.city}} {{item.address.pcd.district}} {{item.address.pcd.street}} {{item.address.address}} </span> <a href="javascript:" ng-click="pagedata.openLocation(item.address);" class="red" style="font-size:0.65rem;line-height: 1.5;"><i class="icon icon-lvyoutehui"></i>导航</a></div>
				</div>
			</div>

			<div class="right" style="padding:0.3rem 0.5rem">
				<span ng-if="(item.status ==0 || item.status ==2) && item.orderid!=0">
					<div ng-if="item.status==0" class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="pagedata.buypay(item.id)">支付</div>
					<div ng-if="item.status==2" class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" ng-click="post({},'/feelog/receive/','id='+item.id+'&isfee='+item.orderid)">确认完成</div>
				</span>
				<span ng-if="item.status==1">
						<div class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="pagedata.show_verify(item.verifyurl,item.verifycode)">
							<i class="icon icon-qrcode" style="vertical-align: middle;"></i>
							核销
						</div>
						<div ng-if="item.orderstatus==1 && pagedata.ismyitem && (item.groupsendset==1 || item.info.groupsendset==1 || item.info.sendtype==1)" class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="pagedata.showfa(item.orderid)">
							发货
						</div>
				</span>
				<span ng-if="item.fee>0 && item.status==1 && pagedata.ismyitem==2">
						<div class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="pagedata.showtuikuan=true;pagedata.item=item">
							申请退款
						</div>
				</span>
				<span ng-if="item.fee>0 && item.status==4  && pagedata.ismyitem==2">
						<div class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="post({},'/feelog/deltuikuan/id='+item.id)">
							取消退款
						</div>
				</span>
				<span ng-if="item.fee>0 && item.status==4  && pagedata.ismyitem==1">
						<div class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:"  ng-click="post({},'/feelog/chetuikuan/id='+item.id)">
							同意退款
						</div>
				</span>
			</div>
		</div>
</div>
<div id="showexpress"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">发货</div>
				</div>
				<div class="fui-cell">
						<div class="fui-cell-text">快递公司</div>					
						<div class="fui-cell-remark" style="color:#61bba7">
							<select class="r" ng-model="pagedata.post.express_id" name="expressno">
								<option ng-repeat="ex in pagedata.express" ng-selected="pagedata.post.express_id==ex.id" value="{{ex.id}}">{{ex.name}}</option>
							</select>
						</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-text">快递单号</div>
					<div class="fui-cell-text">
						<input type="text" placeholder="请输入快递单号" class="fui-input r" ng-model="pagedata.post.expresssn" id="subtitle" />
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a aria-hidden="true" data-dismiss="modal" ng-click="post(pagedata.post,'/order/fa/')" class="nav-item btn btn-success confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.showfa=function(id){
	scope.pagedata.post.id=id;
	$('#showexpress').modal();
}
	scope.pagedata.openLocation=function(item){
		wx.openLocation({
			latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
			longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
			name: item.province+item.city+item.district, // 位置名
			address: item.xiangxi, // 地址详情说明
			scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
			infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
			success:function(){
				//alert(1111);
			}
		});
	}
</script>